Online documentation - WebsydianExpress v3.5 |
APIServer.AuthorizedEvents.IsSessionAuthorized
Field | Variable | ...as | Description |
---|---|---|---|
SessionSurrogate | Input | Input | The identification of the session. |
AuthorizedEventImplName | Input | Input | The name of the event to check. |
SessionAuthorizedForEvent | Output | Output | Yes: The session is authorized for the event.
No: The session is not authorized for the event. |
This is the function that is used to determine whether the specified session is authorized for a specific event (identified by the name of the event).
The function checks whether the event is registered in the authorized event table. If not, AuthorizedEvent.FindDefaultEvent is used to retrieve the default event for the site. The event is registered based on this default event.
If the event is marked as Allowed for = "All users", this API will always return Yes.
If the event is marked as Allowed for = "No users", this API will always return No.
If the event is role based, the API will return Yes if the event has at least one role match with the session - otherwise it will return No.